/*!
    @header ManagedObjectsExporter
    @abstract A ManagedObjectsExporter allows you to export managed object to a xml file.
	@discussion A ManagedObjectsExporter needs to know two things to export managed objects.
	<ol>
	<li>which objects should be exported</li>
	<li>where should the xml file (containing the exported managed objects) be saved</li>
	</ol>
*/

#import <Cocoa/Cocoa.h>

@interface MO2XMLManagedObjectsExporter : NSObject {
	NSArray *managedObjects;
	NSDictionary *properties;
}

- (id)init;
- (void)dealloc;

/*!
    @method managedObjects    
    @result Returns the managed objects as an array which you can set with setManagedObjects:(NSArray *)
*/
- (NSArray *)managedObjects;

/*!
    @method setManagedObjects    
    @param value An array of managed objects you want to export.
*/
- (void)setManagedObjects:(NSArray *)value;

/*!
    @method managedObjectsAsDictionaries   
	@discussion The returned array contains NSDictionaries. Each dictionary represents one managed object.
    @result Returns the managed objects which you can set with setManagedObjects:(NSArray *) as an array of dictionaries.
*/
- (NSArray *)managedObjectsAsDictionaries;

- (NSDictionary *)properties;
- (void)setProperties:(NSDictionary *)value;

/*!
    @method writeToFile   
	@discussion Exports the managed objects set with setManagedObjects:(NSArray *) to the file at path.
    @result Returns YES if everything went fine and NO if there were any errors.
*/
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag;

@end
